﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script src="../scripts/boot.js" type="text/javascript"></script>
    <script type="text/javascript">
        $.ajax({
            url: "../data/system.aspx?method=89",
            async: false,
            success: function (text) {
                if (text == "no")
                    window.location = "../system/error.html";
                else if (text == "out") {
                    var loginWindow = parent.mini.get("loginWindow");
                    if (!loginWindow.visible)
                        loginWindow.show();
                    var tabs = parent.mini.get("mainTabs");
                    var tab = tabs.getTab("tab$89");
                    tabs.removeTab(tab);
                }
            }
        });
    </script>
</head>
<body>
    <div class="mini-toolbar" style="border-bottom: 0;">
        <table>
            <tr>
                <td>
                    求职意向：
                    <input id="type1" class="mini-combobox" textField="jt_name" valueField="jt_id" onvaluechanged="onTypeChanged"
                        style="width: 150px;" url="../data/system.aspx?method=CbxJobTypeP" value="0"/>
                    <input id="type2" class="mini-combobox" textField="jt_name" valueField="jt_id"
                        style="width: 150px;"/>
                    专业类别：
                    <input id="major1" class="mini-combobox" textField="ma_name" valueField="ma_id" onvaluechanged="onMajorChanged"
                        style="width: 150px;" url="../data/system.aspx?method=CbxMajorP" value="0"/>
                    <input id="major2" class="mini-combobox" textField="ma_name" valueField="ma_id"
                        style="width: 150px;"/>
                </td>
            </tr>
            <tr>
                <td>
                    学历：
                    <input id="edu" class="mini-combobox" textField="di_name" valueField="di_code" 
                        style="width: 150px;" url="../data/system.aspx?method=CbxEduNoAll" value="0"/>
                    登录日期：
                    <input id="sdate" class="mini-datepicker"/>
                    至
                    <input id="edate" class="mini-datepicker"/>
                    <a class="mini-button" iconcls="icon-search" plain="true" onclick="search();">查询</a>
                    <span class="separator"></span>
                    <a class="mini-button" plain="true" iconcls="icon-excel" onclick="excelRow()">查询结果手机号导出</a>
                </td>
            </tr>
        </table>
    </div>
    <div class="mini-fit" >
        <div id="datagrid1" class="mini-datagrid" style="width:100%;height:100%;" allowresize="true"
            idfield="id" url="../data/system.aspx?method=SPersonTel" sizeList="[15,20,50,100]" pageSize="15">
            <div property="columns">
                <div type="indexcolumn"></div>
                <div field="pi_name" width="100px" headeralign="center" align="center" allowsort="true">
                    姓名</div>
                <div field="sex" width="60px" headeralign="center" align="center" allowsort="true">
                    性别</div>
                <div field="edu" width="60px" headeralign="center" align="center" allowsort="true">
                    学历</div>
                <div field="spcode" width="200px" headeralign="center" align="center" allowsort="true" renderer="onSpCodeRenderer">
                    专业</div>
                <div field="yx1" width="200px" headeralign="center" align="center" allowsort="true" renderer="onJobtype1Renderer">
                    求职意向1</div>
                <div field="yx2" width="200px" headeralign="center" align="center" allowsort="true" renderer="onJobtype2Renderer">
                    求职意向2</div>
<!--                <div field="pi_forlang" width="60px" headeralign="center" align="center" allowsort="true" renderer="onForRenderer">
                    外语水平</div>
                <div field="pi_computer" width="70px" headeralign="center" align="center" allowsort="true">
                    计算机水平</div>
                <div field="pi_zhicheng" width="60px" headeralign="center" align="center" allowsort="true">
                    职称</div>
                <div field="pi_college" width="120px" headeralign="center" align="center" allowsort="true">
                    毕业学校</div>
                <div field="pi_bysj" width="60px" headeralign="center" align="center" allowsort="true">
                    毕业时间</div>
                <div field="pi_pay" width="100px" headeralign="center" align="center" allowsort="true" renderer="onPayRenderer">
                    期望月薪</div>
                <div field="kind" width="60px" headeralign="center" align="center" allowsort="true">
                    工作性质</div>
                <div field="pi_hits" width="60px" headeralign="center" align="center" allowsort="true">
                    浏览量</div>-->
                <div field="area" width="60px" headeralign="center" align="center" allowsort="true">
                    工作地区</div>
                <div field="fw_mobile" width="80px" headeralign="center" align="center" allowsort="true" renderer="onMobileRenderer">
                    手机号码</div>
                <div field="pi_logintime" width="80px" headeralign="center" align="center" allowsort="true" dateFormat="yyyy-MM-dd">
                    最后登录日期</div>
            </div>
        </div>
    </div>
    <iframe id="exportIFrame" style="display:none;"></iframe>
    <!--导出Excel相关HTML-->
     <form id="excelForm" action="../data/download.aspx?method=ExcelPersonMobile" method="post" target="excelIFrame">
        <input type="hidden" name="type1" id="Hidden1" />
        <input type="hidden" name="type2" id="Hidden2" />
        <input type="hidden" name="major1" id="Hidden3" />
        <input type="hidden" name="major2" id="Hidden4" />
        <input type="hidden" name="edu" id="Hidden5" />
        <input type="hidden" name="sdate" id="Hidden6" />
        <input type="hidden" name="edate" id="Hidden7" />
    </form>
    <iframe id="excelIFrame" name="excelIFrame" style="display:none;"></iframe>
    <script type="text/javascript">
        $.ajaxSetup({
            contentType: "application/x-www-form-urlencoded;charset=utf-8",
            complete: function (XMLHttpRequest, textStatus) {
                if (XMLHttpRequest.responseText == "out") {
                    var loginWindow = parent.mini.get("loginWindow");
                    if (!loginWindow.visible)
                        loginWindow.show();
                }
            }
        });

        mini.parse();

        var grid = mini.get("datagrid1");
        search();

        function search() {
            var type1 = mini.get("type1").getValue();
            var type2 = mini.get("type2").getValue();
            var major1 = mini.get("major1").getValue();
            var major2 = mini.get("major2").getValue();
            var edu = mini.get("edu").getValue();
            var sdate = mini.get("sdate").getText();
            var edate = mini.get("edate").getText();
            $("#Hidden1").val(type1);
            $("#Hidden2").val(type2);
            $("#Hidden3").val(major1);
            $("#Hidden4").val(major2);
            $("#Hidden5").val(edu);
            $("#Hidden6").val(sdate);
            $("#Hidden7").val(edate);

            grid.load({ type1: type1, type2: type2, major1: major1, major2: major2, edu: edu, sdate: sdate, edate: edate });
            grid.sortBy("pi_no", "desc");
        }

        function onTypeChanged(e) {
            var type1 = mini.get("type1").getValue();
            mini.get("type2").setValue("");
            var url = "../data/system.aspx?method=CbxJobTypeByP&id=" + type1
            mini.get("type2").setUrl(url);
            mini.get("type2").select(0);
        }

        function onMajorChanged(e) {
            var major1 = mini.get("major1").getValue();
            mini.get("major2").setValue("");
            var url = "../data/system.aspx?method=CbxMajorByP&id=" + major1
            mini.get("major2").setUrl(url);
            mini.get("major2").select(0);
        }

        function onSpCodeRenderer(e) {
            if (e.record.pi_sp != null && e.record.pi_sp != "")
                return e.value + '(' + e.record.pi_sp + ')';
            return e.value;
        }

        function onJobtype1Renderer(e) {
            var record = e.record;
            if (record.yx11 != null)
                return e.value + '(' + record.yx11 + ')';
            return e.value;
        }

        function onJobtype2Renderer(e) {
            var record = e.record;
            if (record.yx22 != null)
                return e.value + '(' + record.yx22 + ')';
            return e.value;
        }

        function onForRenderer(e) {
            var record = e.record;
            if (record.pi_forlevel != null)
                return e.value + record.pi_forlevel;
            return e.value;
        }

        function onPayRenderer(e) {
            var record = e.record;
            if (record.pi_mt == 1)
                return e.value + '(可面谈)';
            return e.value;
        }

        function onMobileRenderer(e) {
            var record = e.record;
            if (e.value == null || e.value == "")
                return record.pi_mobile;
            return e.value;
        }

        function excelRow() {
            mini.confirm("确定导出求职人才手机吗？", "系统提示",
                function (action) {
                    if (action == "ok") {
                        $("#excelForm").submit();
                    }
                }
            );
        }
    </script>
</body>
</html>